<!DOCTYPE html>
<html>
<head>
    <title>商户列表</title>
    <#include "/header.html">
</head>
<body>
<style>
    #container {width:100%; height: 500px; }
</style>
<style type="text/css">
    body {
        font-size: 12px;
    }
    #tip {
        background-color: #ddf;
        color: #333;
        border: 1px solid silver;
        box-shadow: 3px 4px 3px 0px silver;
        position: absolute;
        /*top: 10px;*/
        /*right: 10px;*/
        left: 280px;
        border-radius: 5px;
        overflow: hidden;
        line-height: 20px;
    }
    #tip input[type="text"] {
        height: 25px;
        border: 0;
        padding-left: 5px;
        width: 230px;
        border-radius: 3px;
        outline: none;
    }

     #container {
         width:400px;
         height: 300px;
     }
</style>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商铺名称：</div>
            <div style="float: left;width:160px;margin-right: 10px;">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="商铺名称">
            </div>

            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">店铺地址：</div>
            <div style="float: left;width:160px;margin-right: 10px;">
                <input type="text" class="form-control" v-model="q.address" placeholder="店铺地址"/>
            </div>
            <a class="btn btn-primary" @click="query">查询</a>
        </div>
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>

    <div class="modal fade" id="myModalCX" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="z-index: 1041" >
            <form class="form-horizontal">
                <div class="modal-content" style="width: 750px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                            <div style="float: left;width:70px;margin-right: 10px;">
                                <select class="form-control" v-model="qcx.status" @keyup.enter="queryAdminCX" id="s_id1">
                                    <option value="0">正常</option>
                                    <option value="1">禁止</option>
                                </select>
                            </div>

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopName" @keyup.enter="queryAdminCX" placeholder="请输入内容">
                            </div>
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopPhone" @keyup.enter="queryAdminCX" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="queryAdminCX">搜索</a>
                        </div>

                        <table id="jqGridAddCX" style="width: 100%;"></table>
                        <div id="jqGridPagerCX"></div>
                        <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="modal fade" id="myModalShopAdmin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <form class="form-horizontal">
                <div class="modal-content" style="width: 850px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择店铺管理员</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                            <div style="float: left;width:70px;margin-right: 10px;">
                                <select class="form-control" v-model="qxzl.status" @keyup.enter="queryShopAdminLast" id="s_id12">
                                    <option value="0">正常</option>
                                    <option value="1">禁用</option>
                                </select>
                            </div>
                            <div class="form-group col-sm-2">
                                <input type="text" class="form-control" v-model="qxzl.adminName" @keyup.enter="queryShopAdminLast" placeholder="管理员名称">
                            </div>
                            <div class="form-group col-sm-2">
                                <input type="text" class="form-control" v-model="qxzl.adminPhone" @keyup.enter="queryShopAdminLast" placeholder="手机号码">
                            </div>
                            <div class="form-group">
                                <div style="vertical-align: middle;display: table-cell!important;">
                                    <div id="agentParentQueryAdminCX2" style="float: left" class="col-sm-10">
                                        <input type="text" class="form-control" v-model="qxzl.adminParent" disabled="disable" placeholder="所属代理商"/>
                                    </div>
                                    <div class="col-sm-2">
                                        <a class="btn btn-primary"  @click="addShopAdminCXLast">&nbsp;选择</a>
                                    </div>
                                </div>
                            </div>

                            <!--<div class="form-group">-->
                            <!--<div style="float: left;margin-left:10px;height:24px;line-height:14px;">所属业务员：&nbsp;</div>-->
                            <!--<div class="col-sm-2" id="adminBusParentAdmin">-->
                            <!--<input type="text" class="form-control" id="nameBusAdmin" @keyup.enter="queryShopAdminLast" v-model="merchant.businessId" placeholder="选择业务员">-->
                            <!--</div>-->
                            <!--</div>-->
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qxzl.adminPhone" @keyup.enter="queryShopAdminLast" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="queryShopAdminLast">搜索</a>
                        </div>
                        <table id="jqGridAddShopAdminCX" style="width: 100%;"></table>
                        <div id="jqGridPagerShopAdminCX"></div>
                        <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->

                        <div class="modal fade" id="myModalShopAdminCXLast" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="width: 750px;">
                            <div class="modal-dialog" role="document" style="z-index: 1041" >
                                <form class="form-horizontal">
                                    <div class="modal-content" style="width: 666px;">
                                        <div style="padding: 15px;">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                            <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                                <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                                            </div>
                                        </div>
                                        <div class="modal-body">
                                            <div style="margin-bottom: 15px">
                                                <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                                                <div style="float: left;width:70px;margin-right: 10px;">
                                                    <select class="form-control" v-model="qcxll.status" @keyup.enter="queryShopAdminCXLast" id="s_id1l2">
                                                        <option value="0">正常</option>
                                                        <option value="1">禁止</option>
                                                    </select>
                                                </div>

                                                <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                                                <div style="float: left;width:120px;margin-right: 10px;">
                                                    <input type="text" class="form-control" v-model="qcxl.shopName" @keyup.enter="queryAdminCXLast" placeholder="请输入内容">
                                                </div>
                                                <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                                <div style="float: left;width:120px;margin-right: 10px;">
                                                    <input type="text" class="form-control" v-model="qcxl.shopPhone" @keyup.enter="queryAdminCXLast" placeholder="请输入内容">
                                                </div>

                                                <a class="btn btn-primary" @click="queryAdminCXLast">搜索</a>
                                            </div>

                                            <table id="jqGridAddShopAdminCXLast" style="width: 100%;"></table>
                                            <div id="jqGridPagerShopAdminCXLast"></div>
                                            <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>

                    </div>
                </div>
            </form>
        </div>
    </div>
        <!-- 商户统计 -->
        <div class="modal fade" id="myModaldls" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <form class="form-horizontal">
                    <div class="modal-content" style="width: 750px;">
                        <div style="padding: 15px;">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">商户订单统计</p>
                            </div>
                        </div>
                        <div class="modal-body">
                            <div style="margin-bottom: 15px">

                                <div style="float: left;margin-left:10px;height:34px;line-height:34px;">订单编号：</div>
                                <div style="float: left;width:120px;margin-right: 10px;">
                                    <input type="text" class="form-control" v-model="dlstj.orderSn" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                                </div>

                                <a class="btn btn-primary" @click="queryMerchantTj">搜索</a>
                            </div>

                            <table id="jqGridAdddls" style="width: 100%;"></table>
                            <div id="jqGridPagerdls" style="width: 100%;"></div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">商户名称</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.name" placeholder="商户名称"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label">店铺负责人</div>
            <div style="vertical-align: middle;display: table-cell!important;">
                <div id="agentAdmin" style="float: left" class="col-sm-10">
                    <input type="text" class="form-control" disabled="disable" v-model="merchant.userid"/>
                </div>
                <div class="col-sm-2">
                    <a class="btn btn-primary"  @click="addAgentXZ">&nbsp;选择</a>
                </div>
            </div>
        </div>
        <!--<div class="form-group">
            <div class="col-sm-2 control-label">所属代理商</div>
            <div id="beAgent" class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.agent" placeholder="所属代理商"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">所属业务员</div>
            <div id="beBussness" class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.businessid" placeholder="所属业务员"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">业务员佣金百分比</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.businessRatio" placeholder="业务员佣金百分比"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">商铺佣金百分比</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.shopRatio" placeholder="商铺佣金百分比"/>
            </div>
        </div>-->

        <div class="form-group" id="t2">
            <div class="col-sm-2 control-label">商铺LOGO</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.shopLogo" id="shopLogo" placeholder="商铺LOGO"
                       readonly="readonly"/>
                <button type="button" class="layui-btn  layui-btn-sm" id="xzShopLogo">
                    选择图片
                </button>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="isShopLogo">
                    上传
                </button>
                <div id="xsShopLogo"></div>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">商铺图片</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" v-model="merchant.shopImg" placeholder="商铺图片"/>-->
        <!--</div>-->
        <!--</div>-->

        <div class="form-group" id="t1">
            <div class="col-sm-2 control-label">商铺图片</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.shopImg" id="shopImg" placeholder="商铺图片"
                       readonly="readonly"/>
                <button type="button" class="layui-btn  layui-btn-sm" id="xzShopImg">
                    选择图片
                </button>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="isShopImg">
                    上传
                </button>
                <div id="xsShopImg"></div>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">省</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" id="provinceCode" class="form-control" v-model="merchant.province" placeholder="省"/>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">市</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" id="cityCode" class="form-control" v-model="merchant.city" placeholder="市"/>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">区</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" id="districtCode" class="form-control" v-model="merchant.district" placeholder="区"/>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label">详细地址</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.address" placeholder="详细地址"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <div class="col-sm-10" style="width: 400px; height: 300px; border: 1px solid rgb(222, 229, 231);">
                <div id="container"></div>
            </div>

        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">经度</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.longitude" placeholder="经度"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">纬度</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.latitude" placeholder="纬度"/>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">0 系统默认 1 自定义</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" v-model="merchant.chargingType" placeholder="0 系统默认 1 自定义"/>-->
        <!--</div>-->
        <!--</div>-->

        <div class="form-group">
            <div class="col-sm-2 control-label">计费方式</div>
            <label class="radio-inline">
                <input type="radio" name="chargingType" value="0" v-model="merchant.chargingType" checked="checked" @change="getChargingType()"/> 系统默认
            </label>
            <label class="radio-inline">
                <input type="radio" name="chargingType" value="1" v-model="merchant.chargingType" @change="getChargingType()"/> 自定义
            </label>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">0 小时  1 分钟</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" v-model="merchant.chargingCompany" placeholder="0 小时  1 分钟"/>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group" id="unit" hidden="hidden">
            <div class="col-sm-2 control-label">计费单位</div>
            <label class="radio-inline">
                <input id="minute1" type="radio" @change="getHour()" name="chargingCompany" value="0" v-model="merchant.chargingCompany" checked="checked"/> 小时
            </label>
            <!--<label class="radio-inline">-->
            <!--<input id="minute2" type="radio" @change="getHour()" name="chargingCompany" value="1" v-model="merchant.chargingCompany"/> 分钟-->
            <!--</label>-->
        </div>
        <div class="form-group" id="inputUnit">
            <div class="col-sm-2 control-label">计费单位</div>
            <div class="col-sm-10">
                <input type="text" disabled="disable" class="form-control" v-model="merchant.chargingCompany"/>
            </div>
        </div>
        <div>
            <div class="form-group" disabled="disable">
                <div class="col-sm-2 control-label">计费标准</div>
                <div class="col-sm-6">
                    <input type="text" id="charingInput" disabled="disable" class="form-control" v-model="merchant.chargingStandardTime" placeholder="计费标准时间"/>
                </div>
            </div>
            <!--<div class="form-group" hidden="hidden" id="hour">-->
            <!--<div class="col-sm-2 control-label">小时收费</div>-->
            <!--<div class="col-sm-6">-->
            <!--<input type="text" id="hourInput" disabled="disable" class="form-control" v-model="merchant.chargingStandardMoneyHour" placeholder="计费标准钱数"/>-->
            <!--</div>-->
            <!--</div>-->
            <div class="form-group" hidden="hidden" id="minute">
                <div class="col-sm-2 control-label">小时收费</div>
                <div class="col-sm-6">
                    <input type="text"id="minuteInput" disabled="disable" class="form-control" v-model="merchant.chargingStandardMoney" placeholder="计费标准钱数"/>
                </div>
            </div>
        </div>

        <div class="form-group" id="howLongTime" disabled="disable">
            <div class="col-sm-2 control-label">免费时长</div>
            <div class="col-sm-10">
                <input type="text" id="howLongTimeInput" disabled="disable" class="form-control" v-model="merchant.freeTime" placeholder="免费时长"/>
            </div>
        </div>
        <div class="form-group" id="maxPay">
            <div class="col-sm-2 control-label">每日最高消费</div>
            <div class="col-sm-10">
                <input type="text" id="maxPayInput" disabled="disable" class="form-control" v-model="merchant.consume" placeholder="每日最高消费"/>
            </div>
        </div>
        <div class="form-group" id="1Hour">
            <div class="col-sm-2 control-label">密码线一小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="1HourInput" disabled="disable" class="form-control" v-model="merchant.lineOne" placeholder="密码线一小时钱数"/>
            </div>
        </div>
        <div class="form-group" id="2Hour">
            <div class="col-sm-2 control-label">密码线两小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="2HourInput" disabled="disable" class="form-control" v-model="merchant.lineTwo" placeholder="密码线两小时钱数"/>
            </div>
        </div>
        <div class="form-group" id="3Hour">
            <div class="col-sm-2 control-label">密码线三小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="3HourInput" disabled="disable" class="form-control" v-model="merchant.lineThree" placeholder="密码线三小时钱数"/>
            </div>
        </div>
        <div class="form-group" id="4Hour">
            <div class="col-sm-2 control-label">密码线四小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="4HourInput" disabled="disable" class="form-control" v-model="merchant.lineFour" placeholder="密码线四小时钱数"/>
            </div>
        </div>
        <div class="form-group"  id="5Hour">
            <div class="col-sm-2 control-label">密码线五小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="5HourInput" disabled="disable" class="form-control" v-model="merchant.lineFive" placeholder="密码线五小时钱数"/>
            </div>
        </div>
        <div class="form-group"  id="6Hour">
            <div class="col-sm-2 control-label">密码线六小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="6HourInput" disabled="disable" class="form-control" v-model="merchant.lineSix" placeholder="密码线六小时钱数"/>
            </div>
        </div>
        <div class="form-group"  id="12Hour">
            <div class="col-sm-2 control-label">密码线十二小时钱数</div>
            <div class="col-sm-10">
                <input type="text" id="12HourInput" disabled="disable" class="form-control" v-model="merchant.lineTwelve" placeholder="密码线十二小时钱数"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">店铺电话</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.shopPhone" placeholder="店铺电话"/>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">营业时间开始</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" id="startTime" placeholder="营业时间开始"/>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">营业时间开始</div>-->
        <!--<div class="col-sm-10">-->
        <!--<el-date-picker v-model="merchant.startTime" type="date" value-format="yyyy-MM-dd HH:mm:ss" placeholder="营业时间开始"></el-date-picker>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">营业时间结束</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" id="endTime" placeholder="营业时间结束"/>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">营业时间结束</div>-->
        <!--<div class="col-sm-10">-->
        <!--<el-date-picker v-model="merchant.endTime" type="date" value-format="yyyy-MM-dd HH:mm:ss" placeholder="营业时间结束"></el-date-picker>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label">人均消费</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.money" placeholder="人均消费"/>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">状态 0 正常 1 异常</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" v-model="merchant.status" placeholder="状态 0 正常 1 异常"/>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label">状态</div>
            <div class="col-sm-10">
                <select class="form-control" v-model="merchant.status" @keyup.enter="query" >
                    <option value="0">正常</option>
                    <option value="1">禁用</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">使用说明概述</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.remarks" placeholder="使用说明概述"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">使用说明详情</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="merchant.instruct" placeholder="使用说明详情"/>
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<div class="col-sm-2 control-label">创建时间</div>-->
        <!--<div class="col-sm-10">-->
        <!--<input type="text" class="form-control" v-model="merchant.createdTime" placeholder="创建时间"/>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>

            <div class="modal fade" id="myModalXZ" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <form class="form-horizontal">
                        <div class="modal-content" style="width: 850px;">
                            <div style="padding: 15px;">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                    <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择店铺管理员</p>
                                </div>
                            </div>
                            <div class="modal-body">
                                <div style="margin-bottom: 15px">
                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">管理员名称：</div>
                                    <div style="float: left;width:160px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="q.number" @keyup.enter="query" placeholder="管理员名称">
                                    </div>

                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                    <div style="float: left;width:160px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="q.number" @keyup.enter="query" placeholder="手机号码">
                                    </div>

                                    <a class="btn btn-primary" @click="queryAdminXZ">搜索</a>
                                </div>

                                <table id="jqGridAddXZ" style="width: 100%;"></table>
                                <div id="jqGridPagerXZ"></div>

                                <div class="modal fade" id="myModalCXLast" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="width: 750px;">
                                    <div class="modal-dialog" role="document" style="z-index: 1041" >
                                        <form class="form-horizontal">
                                            <div class="modal-content" style="width: 750px;">
                                                <div style="padding: 15px;">
                                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                    <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                                        <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                                                    </div>
                                                </div>
                                                <div class="modal-body">
                                                    <div style="margin-bottom: 15px">
                                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                                                        <div style="float: left;width:70px;margin-right: 10px;">
                                                            <select class="form-control" v-model="qcxl.status" @keyup.enter="queryAdminCXLast" id="s_id1l">
                                                                <option value="0">正常</option>
                                                                <option value="1">禁止</option>
                                                            </select>
                                                        </div>

                                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                                                        <div style="float: left;width:120px;margin-right: 10px;">
                                                            <input type="text" class="form-control" v-model="qcxl.shopName" @keyup.enter="queryAdminCXLast" placeholder="请输入内容">
                                                        </div>
                                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                                        <div style="float: left;width:120px;margin-right: 10px;">
                                                            <input type="text" class="form-control" v-model="qcxl.shopPhone" @keyup.enter="queryAdminCXLast" placeholder="请输入内容">
                                                        </div>

                                                        <a class="btn btn-primary" @click="queryAdminCXLast">搜索</a>
                                                    </div>

                                                    <table id="jqGridAddCXLast" style="width: 100%;"></table>
                                                    <div id="jqGridPagerCXLast"></div>
                                                    <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </form>
                </div>
            </div>


        </div>
    </form>
</div>
</div>

<link rel="stylesheet" href="${request.contextPath}/statics/plugins/layui-v2.4.5/css/layui.css">
<script src="${request.contextPath}/statics/plugins/layui-v2.4.5/layui.js" charset="utf-8"></script>
<script src="${request.contextPath}/statics/js/modules/sys/merchant.js?_${.now?long}"></script>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.13&key=6e5355706293cacf71a780a909deb37d&plugin=AMap.Geocoder"></script>
<script>
    var startDate= laydate.render({
        elem: '#startTime'//指定元素
        ,type: 'datetime'
    });
    var finishDate= laydate.render({
        elem: '#endTime'//指定元素
        ,type: 'datetime'
    });
</script>
<script type="text/javascript">
    var map = new AMap.Map('container', {
        zoom:11,//级别
        viewMode:'3D'//使用3D视图
    });
    var geocoder;
    function regeoCode(point) {
        if(!geocoder){
            geocoder = new AMap.Geocoder({
                city: "010", //城市设为北京，默认：“全国”
                radius: 1000 //范围，默认：500
            });
        }
        var lnglat  = point.split(',');

        geocoder.getAddress(lnglat, function(status, result) {
            if (status === 'complete'&&result.regeocode) {
                var address = result.regeocode.formattedAddress;
                $("#detailedaddress").val(address);
            }else{alert(JSON.stringify(result))}
        });
    }

    map.on('click',function(e){
        var point = e.lnglat.lng+","+e.lnglat.lat
        regeoCode(point);
    })

</script>
</body>
</html>